<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="sitemesh" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>OCR接口识别与应用软件——首页</title>
    <link rel="stylesheet" href="${ctx}/static/styles/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/static/styles/bootstrap-theme.min.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/static/styles/common.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/static/styles/index.css" type="text/css">
</head>
<body>
<div class="index-top">
    <div class="index-header">
        <div class="container">
            <div class="index-logo">
                <%--<img src="${ctx}/static/images/doc.png">--%>
                <p style="font-size: xx-large">OCR接口识别与应用软件</p>
            </div>
            <shiro:hasRole name="user">
                <div class="dropdown pull-right index-username">
                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
                            data-toggle="dropdown">
                        <shiro:principal
                                property="name"/>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <li role="presentation"><a role="menuitem" tabindex="-1"
                                                   href="${ctx}/profile">修改个人信息</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="${ctx}/logout">注销用户</a>
                        </li>
                    </ul>
                </div>
            </shiro:hasRole>
            <shiro:hasRole name="admin">
                <div class="dropdown pull-right index-username">
                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu12"
                            data-toggle="dropdown">
                        <shiro:principal
                                property="name"/>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <li role="presentation"><a role="menuitem" tabindex="-1"
                                                   href="${ctx}/profile">修改个人信息</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="${ctx}/logout">注销用户</a>
                    </ul>
                </div>
            </shiro:hasRole>
            <div class="index-menu">
                <ul>
                    <li class="first-item index-item"><a href="${ctx}/index">首页</a></li>
                    <li class="index-item"><a href="${ctx}/index/search">文档检索</a></li>
                    <li class="index-item"><a href="${ctx}/para/searchentry">文档段落检索</a></li>
                    <li class="index-item"><a href="${ctx}/doc/list">文档管理</a></li>
                    <shiro:guest>
                        <li class="index-item last-item"><a href="${ctx}/login" class="index-login">登录/注册</a></li>
                    </shiro:guest>
                </ul>
            </div>

        </div>
    </div>
    <div class="container">
        <div class="col-lg-5 col-md-5 col-sm-5 fadeInLeft">
            <div class="index-info">
                <h2>文档查询</h2>
                <form class="general-search-form" action="${ctx}/doc/search" method="get">
                    <div class="input-group input-group-lg index-search">
                        <input class="form-control user-search" type="text" name="keyword" placeholder="快速搜索">
                        <span class="input-group-btn">
                            <button class="btn" type="submit">
                                <span class="glyphicon glyphicon-search"></span>
                            </button>
                        </span>
                    </div>
                </form>
            </div>
        </div>
        <div class="col-lg-7 col-md-7 col-sm-7">
            <div class="row">
                <div class="col-lg-4 col-md-4 col-sm-4 index-function">
                    <a class="index-icon index-icon-search scale" href="${ctx}/index/search"></a>
                    <h4><a href="${ctx}/index/search">简单搜索</a></h4>
                    <p>最快速的搜索途径，帮助您快速获得文档信息</p>
                </div>
                <div class="col-lg-4 col-md-4 col-sm-4 index-function">
                    <a class="index-icon index-icon-analysis scale" href="${ctx}/doc/seniorSearch"></a>
                    <h4><a href="${ctx}/doc/seniorSearch">高级搜索</a></h4>
                    <p>最全面的搜索方式，帮您挖掘深度信息</p>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="index-footer">
    <div class="container">
        <div class="row">
            <div class="col-sm-8">
                <p>地址：湖北武汉解放大道1863号</p>
                <p>联系电话：027-82820163</p>
            </div>
            <div class="col-sm-4">
                <p>&copy;2017 长江设计院</p>
                <p>隐私声明和cookies | 使用条款 | 帮助</p>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/static/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="${ctx}/static/js/bootstrap.min.js" type="text/javascript"></script>
<script>

    $(".index-rel-link-tab").mouseenter(function () {
        var $index = $(this).index();
        $(".index-rel-link-list").eq($index).show();
    }).mouseleave(function () {
        $(".index-rel-link-list").hide();
    })

    $(".index-rel-link-list").mouseenter(function () {
        var $index = $(this).index();
        $(".index-rel-link-list").eq($index).show();
        $(".index-rel-link-tab").eq($index).addClass('active');
    }).mouseleave(function () {
        $(".index-rel-link-list").hide();
        $(".index-rel-link-tab").removeClass('active');
    })
</script>
</body>
</html>